﻿@model AgileZen.Models.Stories

@{
    ViewBag.Title = "Stories";
}

<h2>Index</h2>
@Html.ActionLink("Add", "Add", "Story", new { projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)
<table>
    <tr>
        <td></td>
        <td>Text</td>
        <td>Size</td>
        <td>Color</td>
        <td>Status</td>
        <td>Reason Blocked</td>
        <td>Phase</td>
        <td>Tags</td>
        <td>tasks</td>
        <td></td>
    </tr>
@foreach (var story in Model.Items)
{ 
    <tr>
        <td>@Html.ActionLink("Edit", "Edit", "Story", new { id = story.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
        <td>@Html.ActionLink(story.Text, "Details", "Story", new { id = story.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
        <td>@story.Size</td>
        <td>@story.Color</td>
        <td>NOT IMPLEMENTED</td>
        <td>NOT IMPLEMENTED</td>
        <td>@story.Phase.Name</td>
        <td>@Html.ActionLink("Tags", "Tags", "Story", new { id = story.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
        <td>@Html.ActionLink("Tasks", "Tasks", "Story", new { id = story.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
        <td>@Html.ActionLink("Comments", "Index", "Comment", new { storyid = story.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
        <td>@Html.ActionLink("Delete", "Delete", "Story", new { id = story.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
    </tr>
}
</table>

